<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html 	xmlns="http://www.w3.org/1999/xhtml" 
		xmlns:ui="http://java.sun.com/jsf/facelets" 
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core" 
		xmlns:p="http://primefaces.org/ui" 
		xmlns:pe="http://primefaces.org/ui/extensions" >
<h:body>

	<p:dialog widgetVar="membershipPaymentViewWidget"
			id="membershipPaymentViewWidgetId" height="550" width="500" header="View Membership Payment"
			closable="true" draggable="true" resizable="false" modal="true" appendToBody="true">
			<h:form id="membershipPaymentViewForm" >
			<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />  
			<p:panel id="panel" header="View Membership Payment Details">  
			
					<h:panelGrid columns="3">
					    <h:outputLabel for="no" value="Payment No: " />  
					    <h:outputText id="no" value="#{membershipPaymentMB.membershipPayment.paymentNo}"/>
					    <p:message id="noMsg" for="no" display="default" />					
					  
					    <h:outputLabel for="name" value="Name: " />  
					    <h:outputText id="name" value="#{membershipPaymentMB.membershipPayment.member.name}"/>
					    <p:message id="nameMsg" for="name" display="default" /> 
					    
						<h:outputLabel for="remark" value="Remark: " />  
					    <p:inputTextarea id="remark" value="#{membershipPaymentMB.membershipPayment.remark}" label="description" maxlength="500" rows="5" cols="30" readonly="true"> 
					    </p:inputTextarea >
					    <p:message id="remarkMsg" for="remark" display="default" /> 
					    
					    <h:outputLabel for="membership" value="Membership: " />  
					    <h:outputText id="membership" value="#{membershipPaymentMB.membershipPayment.member.membership.name}"/>
					    <p:message id="membershipMsg" for="membership" display="default" /> 			   
					    
						<h:outputLabel for="fee" value="Fee: " />  
					    <h:outputText id="fee" value="RM #{membershipPaymentMB.membershipPayment.member.membership.price}" />  
					    <p:message id="feeMsg" for="fee" display="default" />
					    
					    <h:outputLabel for="payment" value="Payment Date: " />  
					    <h:outputText id="payment" value="#{membershipPaymentMB.membershipPayment.paymentDate}" > 
					    	<f:convertDateTime pattern="dd MMM yyyy" />
					    </h:outputText> 
					    <p:message id="paymentMsg" for="payment" display="default" /> 	

					    <h:outputLabel for="receiver" value="Received By: " />  
					    <h:outputText id="receiver" value="#{membershipPaymentMB.membershipPayment.receivedBy.name}" >
					    	<f:convertDateTime pattern="dd MMM yyyy" />
					    </h:outputText>  
					    <p:message id="receiverMsg" for="receiver" display="default" /> 
					    
					    <h:outputText value="&nbsp;" />  
					    
					</h:panelGrid> 
					
					<p:commandButton id="btnPrint" value="Print" onclick="PrimeFaces.monitorDownload(start, stop)" ajax="false"> 
						<p:fileDownload value="#{membershipPaymentMB.receiptContent}" />
					</p:commandButton>  					
				
				</p:panel>
				</h:form>
	</p:dialog>				
</h:body>
</html>